package com.edu.compile.dto.redis;

import com.alibaba.fastjson.JSON;
import com.edu.compile.dto.RequestParam;

public class RedisParam extends RequestParam<RedisParam> {

    /**
     * 0-获取；1-写入；2-删除
     */
    private Integer opeType;

    /**
     * 0-固定值；1：来自节点
     */
    private Integer keySource;

    private String keySourceValue;

    private Integer source;

    private String sourceValue;

    @Override
    public RedisParam parse(String requestParam) {
        return JSON.parseObject(requestParam, RedisParam.class);
    }

    public Integer getOpeType() {
        return opeType;
    }

    public void setOpeType(Integer opeType) {
        this.opeType = opeType;
    }

    public String getKeySourceValue() {
        return keySourceValue;
    }

    public void setKeySourceValue(String keySourceValue) {
        this.keySourceValue = keySourceValue;
    }

    public String getSourceValue() {
        return sourceValue;
    }

    public void setSourceValue(String sourceValue) {
        this.sourceValue = sourceValue;
    }

    public Integer getKeySource() {
        return keySource;
    }

    public void setKeySource(Integer keySource) {
        this.keySource = keySource;
    }

    public Integer getSource() {
        return source;
    }

    public void setSource(Integer source) {
        this.source = source;
    }
}
